package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IMyOrderModel;
import com.wgts.wgts.mvp.model.imp.MyOrderModel;
import com.wgts.wgts.mvp.presenter.IMyOrderPersenter;
import com.wgts.wgts.mvp.presenter.imp.MyOrderPersenter;
import com.wgts.wgts.mvp.view.IMyOrderVeiw;
import com.wgts.wgts.netmodle.NetWorkFactory;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/9/1010:06
 *
 */
@Module
public class MyOrderModule {
     private IMyOrderVeiw veiw;

    public MyOrderModule(IMyOrderVeiw veiw) {
        this.veiw = veiw;
    }

    @Provides
    @ActivityScope
    public IMyOrderVeiw provideView(){
        return veiw;
    }

    @Provides
    @ActivityScope
    public IMyOrderModel provideModel(NetWorkFactory netWorkFactory){
        return new MyOrderModel(netWorkFactory);
    }

    @Provides
    @ActivityScope
    public IMyOrderPersenter providePersenter(IMyOrderVeiw veiw, IMyOrderModel model){
        return new MyOrderPersenter(veiw, model);
    }
}
